package com.stu.commons;

import lombok.Data;

@Data
public class ServerResponce {
    private int code;
    private String result;
    private Object data;

    public ServerResponce() {
    }

    public ServerResponce(int code, String result, Object data) {
        this.code = code;
        this.result = result;
        this.data = data;
    }

    public static ServerResponce success(String result, Object data) {
        return new ServerResponce(200, result, data);
    }

    public static ServerResponce fail(String result, Object data) {
        return new ServerResponce(201, result, data);
    }
}
